package com.yodawnla.zombieCity.function;

import org.anddev.andengine.opengl.texture.region.TextureRegion;

import com.yodawnla.lib.YoScene;
import com.yodawnla.lib.util.widget.YoButton;

public class FunctionBtn extends YoButton
{
	Function mFunction;
	
	public FunctionBtn(YoScene scene, float pX, float pY, TextureRegion pTextureRegion)
	{
		super(scene, pX, pY, pTextureRegion);
	}

	public void setFunction(Function function, String param)
	{
		mFunction = function;
		mFunction.setParam(param);
	}
	
	public void onClickedEvent()
	{
		mFunction.execute();
	}
	
}
